<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="ClientGeocoder,com.fgmap.maps.services.ClientGeocoder,geocode,getBaseCountryCode,getOptions,getViewport,resetCache,reverseGeocode,setBaseCountryCode,setOptions,setViewport" name="keywords">
<title>com.fgmap.maps.services.ClientGeocoder</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ClientGeocoder - Google Maps API for Flash Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Google Maps API for Flash Documentation, Version 1.20</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?com/fgmap/maps/services/ClientGeocoder.html&amp;com/fgmap/maps/services/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;ClientGeocoder</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class ClientGeocoder"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.fgmap.maps.services</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public final  class ClientGeocoder</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td>flash.events.IEventDispatcher, <a href="../interfaces/IClientGeocoder.html">IClientGeocoder</a></td>
</tr>
</table>
<p></p>
 A <code>ClientGeocoder</code> object communicates with Google servers to
 obtain geocodes for user-specified addresses. In addition, a geocoder
 maintains its own cache of addresses, which allows repeated queries to be
 answered without a round trip to the server.
  <p>Please note that <code>ClientGeocoder</code> cannot be used until after
 the <code>MapEvent.MAP_READY</code> event has been received from the map.</p>
 <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ClientGeocoder()">ClientGeocoder</a>(options:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a> = null)</div>
<div class="summaryTableDescription">
   Constructs a ClientGeocoder instance for performing geocoding.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#geocode()">geocode</a>(address:String):void</div>
<div class="summaryTableDescription">
   Initiates a geocoding request.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getBaseCountryCode()">getBaseCountryCode</a>():String</div>
<div class="summaryTableDescription">
   Gets the current base country code from the ClientGeocoder.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getOptions()">getOptions</a>():<a href="../services/ClientGeocoderOptions.html">ClientGeocoderOptions</a>
</div>
<div class="summaryTableDescription">
   Retrieves the geocoder object's options.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getViewport()">getViewport</a>():<a href="../../maps/LatLngBounds.html">LatLngBounds</a>
</div>
<div class="summaryTableDescription">
   Gets the current viewport from the ClientGeocoder.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#resetCache()">resetCache</a>():void</div>
<div class="summaryTableDescription">
   Resets the geocoding cache, clearing all results retrieved by this
   and other ClientGeocoder objects.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#reverseGeocode()">reverseGeocode</a>(latLng:<a href="../LatLng.html">LatLng</a>):void</div>
<div class="summaryTableDescription">
   Initiates a reverse geocoding request.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setBaseCountryCode()">setBaseCountryCode</a>(country:String):void</div>
<div class="summaryTableDescription">
   Sets a base country code for the ClientGeocoder.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setOptions()">setOptions</a>(options:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a>):void</div>
<div class="summaryTableDescription">
   Updates the geocoder options.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#setViewport()">setViewport</a>(argViewport:<a href="../LatLngBounds.html">LatLngBounds</a>):void</div>
<div class="summaryTableDescription">
   Sets a viewport for the ClientGeocoder.</div>
</td><td class="summaryTableOwnerCol">ClientGeocoder</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="ClientGeocoder()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ClientGeocoder</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function ClientGeocoder(options:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a> = null)</code><p>
   Constructs a ClientGeocoder instance for performing geocoding.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">options</span>:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a></code> (default = <code>null</code>)<code></code> &mdash;  Full or partial set of geocoding options. When a partial
       set of options is specified, the geocoder object's complete set of
       options will be a combination of this partial set and the defaults.
       In API versions prior to 1.8, the ClientGeocoder constructor took a
       different set of parameters. These parameters are now included within
       class ClientGeocoderOptions. See the example code for details of how
       to replace old code with new code.
       This change makes this class consistent with the majority of other
       classes in the API.
   </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>Deprecated and new-style code for creating a ClientGeocoder.
   <div class='listing'><pre>
   // Old-style code (prior to version 1.8).
   var geocoder:ClientGeocoder = new ClientGeocoder("AU", myLatLngBounds);
      // New-style code
   var geocoder:ClientGeocoder = new ClientGeocoder(
       new ClientGeocoderOptions({
         countryCode: "AU",
         viewport: myLatLngBounds
       }));</pre></div>
   <p></p>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="geocode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">geocode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function geocode(address:String):void</code><p>
   Initiates a geocoding request.
   Dispatches GeocodingEvent.GEOCODING_SUCCESS or
   GeocodingEvent.GEOCODING_FAILURE on completion.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">address</span>:String</code> &mdash;  Address to geocode.
   </td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash;  A null or empty address will cause an ArgumentError
       to be thrown.
   </td>
</tr>
</table>
</div>
<a name="getBaseCountryCode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getBaseCountryCode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getBaseCountryCode():String</code><p>
   Gets the current base country code from the ClientGeocoder.
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>String</code> &mdash; The current country code.
   </td>
</tr>
</table>
</div>
<a name="getOptions()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getOptions</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getOptions():<a href="../services/ClientGeocoderOptions.html">ClientGeocoderOptions</a></code><p>
   Retrieves the geocoder object's options.
   Use the setOptions() method to modify geocoder options.
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../services/ClientGeocoderOptions.html">ClientGeocoderOptions</a></code> &mdash; 
                         Full set of options for the geocoder object.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="getViewport()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getViewport</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getViewport():<a href="../../maps/LatLngBounds.html">LatLngBounds</a></code><p>
   Gets the current viewport from the ClientGeocoder.
      </p><p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../../maps/LatLngBounds.html">LatLngBounds</a></code> &mdash; 
                        The current viewport.
   
                        
                     </td>
</tr>
</table>
</div>
<a name="resetCache()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">resetCache</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function resetCache():void</code><p>
   Resets the geocoding cache, clearing all results retrieved by this
   and other ClientGeocoder objects.
   </p></div>
<a name="reverseGeocode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">reverseGeocode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function reverseGeocode(latLng:<a href="../LatLng.html">LatLng</a>):void</code><p>
   Initiates a reverse geocoding request.
   Dispatches GeocodingEvent.GEOCODING_SUCCESS or
   GeocodingEvent.GEOCODING_FAILURE on completion.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">latLng</span>:<a href="../LatLng.html">LatLng</a></code> &mdash;  LatLng to reverse geocode.
   </td>
</tr>
</table>
<br>
<span class="label">Throws</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code></code> &mdash;  A null LatLng will cause an ArgumentError
       to be thrown.
   </td>
</tr>
</table>
</div>
<a name="setBaseCountryCode()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setBaseCountryCode</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setBaseCountryCode(country:String):void</code><p>
   Sets a base country code for the ClientGeocoder.
      The base country code may bias the search towards results in the specified
   country. For example, if there is a city named Foo in countries XX and YY,
   setting base country code to YY causes geocoder to favor "Foo, YY"
   over "Foo, X". etc., and so on. This is designed to work exactly as
   if the caller were using the geocoder for the specified country.
   Specifying a base country code of "ES" will cause the geocoder to behave
   exactly as the geocoder at maps.google.es.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">country</span>:String</code> &mdash; The base country code to be set.
   </td>
</tr>
</table>
</div>
<a name="setOptions()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setOptions</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setOptions(options:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a>):void</code><p>
   Updates the geocoder options.
   The options parameter may specify a complete or partial set
   of geocoder options.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">options</span>:<a href="ClientGeocoderOptions.html">ClientGeocoderOptions</a></code> &mdash;  New full or partial set of geocoder options.
   </td>
</tr>
</table>
</div>
<a name="setViewport()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">setViewport</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function setViewport(argViewport:<a href="../LatLngBounds.html">LatLngBounds</a>):void</code><p>
   Sets a viewport for the ClientGeocoder.
   The geocoder will attempt only to return results
   which lie within or near the viewport.
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">argViewport</span>:<a href="../LatLngBounds.html">LatLngBounds</a></code> &mdash; The new viewport for the geocoder.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
